package com.huangsm.book.designmodel;

/**
 * @author huang
 * @PACKAGE_NAME com.huangsm.book.designmodel
 * @PROJECT_NAME concurrence
 * @date 2019/2/15
 */
public class LazySingleton {
    private LazySingleton(){
        System.out.println("lazySingleton is create");
    }
    private static LazySingleton instance=null;
    public static synchronized LazySingleton getInstance(){
        if (instance==null)
            return instance;
        return new LazySingleton();
    }
}
